//
//  EmployeeReport.swift
//  ArchitectGenerics
//
//  Created by 姚胜龙 on 2017/6/26.
//  Copyright © 2017年 姚胜龙. All rights reserved.
//

import UIKit

class EmployeeReport {

    private var br:Array<SLStaffProtocol>?

    init() {
        self.br = Array<SLStaffProtocol>()
        self.br?.append(SLProgremManager(name: "水牛"))
        self.br?.append(SLEngineer(name: "mimi"))
        self.br?.append(SLEngineer(name: "slary"))
        self.br?.append(SLEngineer(name: "Cell"))
        self.br?.append(SLEngineer(name: "Mary"))
    }

    func showReport(visitor:SLVisitorProtocol) {
        for stuff in br! {
            stuff.accept(visitor: visitor)
        }
    }
}
